#!/bin/bash

if [ -d '/opt/server' ]; then
  WORKDIR='/opt/server'
else if [ -d '/opt/agent' ]; then
  WORKDIR='/opt/agent'
fi

cd $WORKDIR
sh start.sh
sleep 3
tail -F $WORKDIR/log/*.log